package cn.wolfcode.luowowo.mgrsite.web.controller;

import cn.wolfcode.luowowo.article.query.TravelQueryObject;
import cn.wolfcode.luowowo.article.service.ITravelService;
import cn.wolfcode.luowowo.common.domain.AjaxResult;
import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/travelCommend")
public class TravelCommendController {

    @Reference
    private ITravelService travelService;

    /**
     * 游记推荐页面
     * @return
     */
    @RequestMapping("/list")
    public String list(@ModelAttribute("qo") TravelQueryObject qo, Model model) {

        PageInfo pageInfo = travelService.queryForList(qo);
        model.addAttribute("pageInfo", pageInfo);

        return "travelCommend/list";
    }

}
